A network switch typically includes a plurality of ports coupled to different links. The network switch receives packets from a network and performs various processing operations on the packets, which may include processing operations related to forwarding of the packet through the network device, such as determining a port of the network device to which to direct a packet based on an address in a header of the packet, metering operations performed to account for packets belonging to certain flows, security policy operations, etc.
In some applications, a network device may process packets differently depending on an origin of the packets. For instance, there may be different processing requirements depending on whether packets are received from an external network coupled to a data center, from another device within a data center, or from network devices located in different layers of a data center.
Some network devices process packets using a data path and a control path. The data path generally buffers data for received packets until the packets are transmitted from the network device, while the control path generally performs processing of the packets. Throughput of the data path is measured as a data rate (e.g., bits per second), while throughput of the control path is typically measured as a packet rate (e.g., packets per second). The packet rate of the control path is affected by the data rate and also a size of the packets being processed. For example, for a same data rate of a stream of packets, the packet rate is relatively higher for a first packet size than for a second packet size that is larger than the first packet size. Performance of the network device is generally improved by mitigating various bottlenecks associated with processing of packets by the control path.